
	
		<!--头部 end-->
		<div class="user">
			<div class="back">
				<img src="__PUBLIC__/Home/Images/user-back.jpg" />
			</div>
			<div class="user-conter">
				<div class="conter">
					<h2><a href="index.html">首页</a>>我的订单</h2>
					<div class="conter-left">
						<ul>
							<li>
								<h1>订单中心</h1>
								<a href="order.html" class="on">我的订单</a>
								<a href="#">我的回购订单</a>
								<a href="#">我的意外保单</a>
							</li>
							<li>
								<h1>个人中心</h1>
								<a href="{:U('User/address')}">地址管理</a>
								<a href="#">我的收藏</a>
								<a href="#">消息提醒</a>
								<a href="#">建议反馈</a>
							</li>
							<li>
								<h1>个人中心</h1>
								<a href="#">我的优惠券</a>
								<a href="#">我的红包</a>
								<a href="#">我的回购券</a>
							</li>
							<li>
								<h1>服务中心</h1>
								<a href="#">退款跟踪</a>
								<a href="#">补办意外保</a>
								<a href="#">以旧换新</a>
							</li>
						</ul>
					</div>
					<div class="conter-right">
						<div class="top">
							<a href="pro_details.html" class="left"><img src="__PUBLIC__/Home/Images/portrait.jpg"></a>
							<div class="right" id="divuser">
								<p class="welcon">您好！<span class="usename">{$username}</span> 欢迎来到会员中心</p>
								<p><i>待付款（<a class="payment">{$status.wait_pay}</a>）</i>    <i>待收货（<a class="delivery">{$status.wait_start}</a>）</i>   <i>待评价（<a class="evaluate">{$status.wait_judge}</a>）  </i></p>
								<p><a href="{:U('User/address')}">收货地址管理</a></p>
								<p><i>我的积分（<a class="integral">0</a>）</i>   <i> 我的优惠券（<a class="coupon">0</a>）</i>  </p>
							</div>
						</div>
						
						<div class="bottom" style="overflow:auto;max-height: 330px">
							<h3>订单详情（已买到的宝贝）</h3>
							<div class="pro">
								<volist name="orders" id="ord">
									<volist name="ord.goods_info" id="goods">
										<ul>
											<li>
												<a href="pro_details.html"><img src="__PUBLIC__/Home/Images/order_00.jpg"></a>
											</li>
											<li><a href="{:U('Goods/goo_details')}">{$goods['pro_name']}</a></li>
											<li><a>{$goods['number']*$goods['price']}</a></li>
											<li>
												<a href="#">申请售后</a>
												<a href="#">投诉卖家</a>
											</li>
											<li>
												<a><if condition="$ord.status eq 0">待付款<elseif condition="$ord.status eq 1"/>待发货<elseif condition="$ord.status eq 2"/>待收货<elseif condition="$ord.status eq 3"/>待评价<elseif condition="$ord.status eq 4"/>交易成功</if></a>
												<a href="#">查看物流</a>
											</li>
											<if condition="$ord.status eq 0">
												<li class="buy"><a>付款</a></li>
											<elseif condition="$ord.status eq 1"/>
												<li><a>等待发货</a></li>
											<elseif condition="$ord.status eq 2"/>
												<li><a>确认收货</a></li>
											<elseif condition="$ord.status eq 3"/>
												<li><a href="{:U('comments',array('order_id'=>$ord['order_id'],'pro_id'=>$goods['pro_id']))}">评价</a></li>
											<elseif condition="$ord.status eq 4"/>
												<li><a href="{:U('comments',array('order_id'=>$ord['order_id'],'pro_id'=>$goods['pro_id']))}">追评</a></li>
											</if>
											<input type="hidden" class="order_id" value="{$ord.order_id}">
											<!-- <li><a href="{:U('comments',array('order_id'=>$ord['order_id'],'pro_id'=>$goods['pro_id']))}">已评价</a></li> -->
										</ul>
									</volist>
								</volist>
							</div>
						</div>
					</div>
				</div>		
			</div>
			
		</div>

		<script type="text/javascript">
			$(".buy").click(function(){
				var order_id = $(this).next('.order_id').val();
				// alert(order_id);

				$.post("{:U('Goods/buy')}",{order_id:order_id,place:'order'},function(data){
					if(data.code == 1){
						location.href = "{:U('Pay/confirm_order')}";
					}else{
						layer.alert(data.info);
					}
				});
			})
		</script>